from flask import Blueprint, render_template, jsonify, request
from models.entity.area import Area
from setting import API_VERSION
import json
from utils.nodetree import get_all_area
# from utils.result import result
from utils.api_result import result

mod = Blueprint("echo", __name__, url_prefix="/api/" + API_VERSION + "/echo", template_folder="templates", static_folder="static")

@mod.route('/get_area/', methods=['GET','POST'])
def echo():
    return result(success=1,code=1,msg='',data=[])

@mod.route('/ping', methods=['GET','POST'])
def ping():
    if request.method == 'POST':
        return result(success=1,code=1,msg='ok', data=[])
    else:
        return result(success=1,code=1,msg='ok', data=[])

@mod.route('/ping/index', methods=['GET','POST'])
def pig():
    return 1111